﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Menu.Master" AutoEventWireup="true" CodeBehind="frmRegItinerario.aspx.cs" Inherits="GestionCurriculos.frmRegItinerario" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript">
    function regresar() {
        //window.location.assign("frmItinerario.aspx");
        if (confirm('¿ Desea cancelar el registro de Itinerario ?') == true) {
            window.location.assign("frmItinerario.aspx");
        }
        else {
            return false;
        }
    }

    function ValidaSoloNumeros() {
        if ((event.keyCode < 48) || (event.keyCode > 57))
            event.returnValue = false;
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<div style="margin:5px; font-family:Rambla">

    <div style="text-align:center">
        <h1> <asp:Label runat="server" ID="lblTitulo"></asp:Label> </h1>
    </div>

    <!-- BOTONERA -->
    <div style="width:90%; height:25px; background-color:#064066;">
        &nbsp;&nbsp;
        <asp:Button runat="server" ID="btnGuardar" Text="Guardar" 
            onclick="btnGuardar_Click"/>
        
         <asp:Button runat="server" ID="btnCancelar" Text="Cancelar" 
            onclick="btnCancelar_Click"  OnClientClick="return regresar();" 
            CausesValidation="False"/>
    </div>
    <div>
<%--    <asp:UpdatePanel runat="server" ID="up1">
<ContentTemplate>--%>
        <table>
            <tr>
                <td>Plan Curricular<b style="color:Red">*</b></td>
                <td>:</td>
                <td><asp:DropDownList runat="server" ID="cboPlanCurricular" Width="200"  AutoPostBack="true"
                        onselectedindexchanged="cboPlanCurricular_SelectedIndexChanged"></asp:DropDownList>
                  <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
           ErrorMessage="Seleccione un plan curricular." style="color:Red"
    ControlToValidate="cboPlanCurricular" InitialValue="Seleccionar"/>
                </td>
            </tr>
            <tr>
                <td>Versión</td>
                <td>:</td>
                <td><asp:TextBox runat="server" ID ="txtVersion" Width="50" ReadOnly="true" Enabled="false"></asp:TextBox>
                </td>
            </tr>
            
            
            
             
        </table>
<%--        </ContentTemplate>
</asp:UpdatePanel>--%>
    </div>
    <div>
    <fieldset>
    <legend>Agregar Curso</legend>
    <table>
    <tr>
                <td>Curso<b style="color:Red">*</b></td>
                <td>:</td>
                <td><asp:DropDownList runat="server" ID="cboCurso" Width="200"></asp:DropDownList>
                <asp:Label runat="server" ID="lblCurso" Text="Seleccione un curso." style="color:Red" visible="false"></asp:Label>
                  <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
           ErrorMessage="Seleccione un curso." style="color:Red"
    ControlToValidate="cboCurso" InitialValue="Seleccionar"/>--%>
                </td>
            </tr>
            <tr>
                <td>Ciclo<b style="color:Red">*</b></td>
                <td>:</td>
                <td><asp:DropDownList runat="server" ID="cboCiclo" Width="200">
                    <asp:ListItem Text="Seleccionar" Value="Seleccionar"></asp:ListItem>
                    <asp:ListItem Text="0" Value="0"></asp:ListItem>
                    <asp:ListItem Text="1" Value="1"></asp:ListItem>
                    <asp:ListItem Text="2" Value="2"></asp:ListItem>
                    <asp:ListItem Text="3" Value="3"></asp:ListItem>
                    <asp:ListItem Text="4" Value="4"></asp:ListItem>
                    <asp:ListItem Text="5" Value="5"></asp:ListItem>
                    <asp:ListItem Text="6" Value="6"></asp:ListItem>
                    <asp:ListItem Text="7" Value="7"></asp:ListItem>
                    <asp:ListItem Text="8" Value="8"></asp:ListItem>
                    <asp:ListItem Text="9" Value="9"></asp:ListItem>
                    <asp:ListItem Text="10" Value="10"></asp:ListItem>
                    <asp:ListItem Text="11" Value="11"></asp:ListItem>
                    <asp:ListItem Text="12" Value="12"></asp:ListItem>
                </asp:DropDownList>
                <asp:Label runat="server" ID="lblCiclo" Text="Seleccione un ciclo." style="color:Red" visible="false"></asp:Label>
                </td>
            </tr>
            <tr>
                <td colspan="3"><asp:Button runat="server" ID="btnAgregarCurso" Text="Agregar" 
                        onclick="btnAgregarCurso_Click"/></td>
               
            </tr>

            <tr>
                <td colspan="3">
                   
                </td>
               
            </tr>
            </table>

             <asp:GridView runat="server" style="text-align:left" ID="gvCursos" AutoGenerateColumns="False" 
                CellPadding="4" ForeColor="#333333" GridLines="None" Width="50%" AllowSorting="true"  OnRowDeleting="gvCursos_RowDeleting"
               ><%-- OnRowDataBound="gvCursos_RowDataBound" --%> 
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <%--<asp:TemplateField>
                        <ItemTemplate>
                            <asp:CheckBox runat="server" id="chkItinerario"/>
                        </ItemTemplate>
                    </asp:TemplateField>--%>
                    <asp:BoundField DataField="ciclo" HeaderText="Ciclo" />
                    <asp:BoundField DataField="codCurso" HeaderText="Código de Curso" />
                    <asp:BoundField DataField="nomCurso" HeaderText="Curso" />
                    <asp:CommandField DeleteText="Eliminar" ShowDeleteButton="True" />
                </Columns>
                <EditRowStyle BackColor="#2461BF" />
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" BorderColor="Black" BorderStyle="solid" BorderWidth="1px" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#EFF3FB"  BorderColor="Black" BorderStyle="solid" BorderWidth="1px"  />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <SortedAscendingCellStyle BackColor="#F5F7FB" />
                <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                <SortedDescendingCellStyle BackColor="#E9EBEF" />
                <SortedDescendingHeaderStyle BackColor="#4870BE" />
            </asp:GridView>
    </fieldset>

    </div>
</div>

</asp:Content>
